﻿using Oracle.ManagedDataAccess.Client;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.Linq;
using System.Text;

namespace PaCSTools.Tool
{
    public class OracleConnHelper
    {
        public static IDbConnection Connection = null;
        public OracleConnHelper()  
        {
            Connection = new OracleConnection();
            Connection.ConnectionString = ConfigurationManager.ConnectionStrings["oradb"].ConnectionString;
        }

        public static IDbConnection CreateInstance()
        {
            if (Connection == null)
            {
                Connection = new OracleConnection();
                Connection.ConnectionString = ConfigurationManager.ConnectionStrings["oradb"].ConnectionString;            
            }
            return Connection;
        }
    }

}
